Integrand size = 23, antiderivative size = 125 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {\left (8 a^2+4 a b+b^2\right ) \arctan (\sinh (c+d x))}{16 d}+\frac {\left (8 a^2+4 a b+b^2\right ) \text {sech}(c+d x) \tanh (c+d x)}{16 d}-\frac {b (8 a+3 b) \text {sech}^3(c+d x) \tanh (c+d x)}{24 d}-\frac {b \text {sech}^5(c+d x) \left (a+(a+b) \sinh ^2(c+d x)\right ) \tanh (c+d x)}{6 d} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3757, 424, 393, 205, 209} \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {\left (8 a^2+4 a b+b^2\right ) \arctan (\sinh (c+d x))}{16 d}+\frac {\left (8 a^2+4 a b+b^2\right ) \tanh (c+d x) \text {sech}(c+d x)}{16 d}-\frac {b (8 a+3 b) \tanh (c+d x) \text {sech}^3(c+d x)}{24 d}-\frac {b \tanh (c+d x) \text {sech}^5(c+d x) \left ((a+b) \sinh ^2(c+d x)+a\right )}{6 d} \]
[In]
[Out]
Rule 205
Rule 209
Rule 393
Rule 424
Rule 3757
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (a+(a+b) x^2\right )^2}{\left (1+x^2\right )^4} \, dx,x,\sinh (c+d x)\right )}{d} \\ & = -\frac {b \text {sech}^5(c+d x) \left (a+(a+b) \sinh ^2(c+d x)\right ) \tanh (c+d x)}{6 d}+\frac {\text {Subst}\left (\int \frac {a (6 a+b)+3 (a+b) (2 a+b) x^2}{\left (1+x^2\right )^3} \, dx,x,\sinh (c+d x)\right )}{6 d} \\ & = -\frac {b (8 a+3 b) \text {sech}^3(c+d x) \tanh (c+d x)}{24 d}-\frac {b \text {sech}^5(c+d x) \left (a+(a+b) \sinh ^2(c+d x)\right ) \tanh (c+d x)}{6 d}+\frac {\left (8 a^2+4 a b+b^2\right ) \text {Subst}\left (\int \frac {1}{\left (1+x^2\right )^2} \, dx,x,\sinh (c+d x)\right )}{8 d} \\ & = \frac {\left (8 a^2+4 a b+b^2\right ) \text {sech}(c+d x) \tanh (c+d x)}{16 d}-\frac {b (8 a+3 b) \text {sech}^3(c+d x) \tanh (c+d x)}{24 d}-\frac {b \text {sech}^5(c+d x) \left (a+(a+b) \sinh ^2(c+d x)\right ) \tanh (c+d x)}{6 d}+\frac {\left (8 a^2+4 a b+b^2\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{16 d} \\ & = \frac {\left (8 a^2+4 a b+b^2\right ) \arctan (\sinh (c+d x))}{16 d}+\frac {\left (8 a^2+4 a b+b^2\right ) \text {sech}(c+d x) \tanh (c+d x)}{16 d}-\frac {b (8 a+3 b) \text {sech}^3(c+d x) \tanh (c+d x)}{24 d}-\frac {b \text {sech}^5(c+d x) \left (a+(a+b) \sinh ^2(c+d x)\right ) \tanh (c+d x)}{6 d} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 9.28 (sec) , antiderivative size = 792, normalized size of antiderivative = 6.34 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {a^2 \sinh (c+d x) \left (-\frac {23555 (a+b)}{a}-\frac {32970 (a+b)^2}{a^2}-14980 \text {csch}^2(c+d x)-\frac {91875 (a+b) \text {csch}^2(c+d x)}{a}-65625 \text {csch}^4(c+d x)-\frac {8855 (a+b)^2 \sinh ^2(c+d x)}{a^2}-620 \, _4F_3\left (\frac {3}{2},2,2,2;1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^2(c+d x)-160 \, _5F_4\left (\frac {3}{2},2,2,2,2;1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^2(c+d x)-16 \, _6F_5\left (\frac {3}{2},2,2,2,2,2;1,1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^2(c+d x)-\frac {968 (a+b) \, _4F_3\left (\frac {3}{2},2,2,2;1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^4(c+d x)}{a}-\frac {288 (a+b) \, _5F_4\left (\frac {3}{2},2,2,2,2;1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^4(c+d x)}{a}-\frac {32 (a+b) \, _6F_5\left (\frac {3}{2},2,2,2,2,2;1,1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^4(c+d x)}{a}-\frac {380 (a+b)^2 \, _4F_3\left (\frac {3}{2},2,2,2;1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^6(c+d x)}{a^2}-\frac {128 (a+b)^2 \, _5F_4\left (\frac {3}{2},2,2,2,2;1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^6(c+d x)}{a^2}-\frac {16 (a+b)^2 \, _6F_5\left (\frac {3}{2},2,2,2,2,2;1,1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^6(c+d x)}{a^2}+\frac {65625 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{\left (-\sinh ^2(c+d x)\right )^{5/2}}+\frac {1680 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right ) \sinh ^4(c+d x)}{\left (-\sinh ^2(c+d x)\right )^{5/2}}-\frac {36855 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{\left (-\sinh ^2(c+d x)\right )^{3/2}}-\frac {91875 (a+b) \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{a \left (-\sinh ^2(c+d x)\right )^{3/2}}+\frac {54180 (a+b) \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{a \sqrt {-\sinh ^2(c+d x)}}+\frac {32970 (a+b)^2 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{a^2 \sqrt {-\sinh ^2(c+d x)}}+\frac {525 (a+b)^2 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right ) \sinh ^4(c+d x)}{a^2 \sqrt {-\sinh ^2(c+d x)}}-\frac {1365 (a+b) \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right ) \sqrt {-\sinh ^2(c+d x)}}{a}-\frac {19845 (a+b)^2 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right ) \sqrt {-\sinh ^2(c+d x)}}{a^2}\right )}{2520 d} \]
[In]
[Out]
Time = 14.47 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.39
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\frac {\operatorname {sech}\left (d x +c \right ) \tanh \left (d x +c \right )}{2}+\arctan \left ({\mathrm e}^{d x +c}\right )\right )+2 a b \left (-\frac {\sinh \left (d x +c \right )}{3 \cosh \left (d x +c \right )^{4}}+\frac {\left (\frac {\operatorname {sech}\left (d x +c \right )^{3}}{4}+\frac {3 \,\operatorname {sech}\left (d x +c \right )}{8}\right ) \tanh \left (d x +c \right )}{3}+\frac {\arctan \left ({\mathrm e}^{d x +c}\right )}{4}\right )+b^{2} \left (-\frac {\sinh \left (d x +c \right )^{3}}{3 \cosh \left (d x +c \right )^{6}}-\frac {\sinh \left (d x +c \right )}{5 \cosh \left (d x +c \right )^{6}}+\frac {\left (\frac {\operatorname {sech}\left (d x +c \right )^{5}}{6}+\frac {5 \operatorname {sech}\left (d x +c \right )^{3}}{24}+\frac {5 \,\operatorname {sech}\left (d x +c \right )}{16}\right ) \tanh \left (d x +c \right )}{5}+\frac {\arctan \left ({\mathrm e}^{d x +c}\right )}{8}\right )}{d}\) | \(174\) |
default | \(\frac {a^{2} \left (\frac {\operatorname {sech}\left (d x +c \right ) \tanh \left (d x +c \right )}{2}+\arctan \left ({\mathrm e}^{d x +c}\right )\right )+2 a b \left (-\frac {\sinh \left (d x +c \right )}{3 \cosh \left (d x +c \right )^{4}}+\frac {\left (\frac {\operatorname {sech}\left (d x +c \right )^{3}}{4}+\frac {3 \,\operatorname {sech}\left (d x +c \right )}{8}\right ) \tanh \left (d x +c \right )}{3}+\frac {\arctan \left ({\mathrm e}^{d x +c}\right )}{4}\right )+b^{2} \left (-\frac {\sinh \left (d x +c \right )^{3}}{3 \cosh \left (d x +c \right )^{6}}-\frac {\sinh \left (d x +c \right )}{5 \cosh \left (d x +c \right )^{6}}+\frac {\left (\frac {\operatorname {sech}\left (d x +c \right )^{5}}{6}+\frac {5 \operatorname {sech}\left (d x +c \right )^{3}}{24}+\frac {5 \,\operatorname {sech}\left (d x +c \right )}{16}\right ) \tanh \left (d x +c \right )}{5}+\frac {\arctan \left ({\mathrm e}^{d x +c}\right )}{8}\right )}{d}\) | \(174\) |
risch | \(\frac {{\mathrm e}^{d x +c} \left (24 a^{2} {\mathrm e}^{10 d x +10 c}+12 a b \,{\mathrm e}^{10 d x +10 c}+3 b^{2} {\mathrm e}^{10 d x +10 c}+72 a^{2} {\mathrm e}^{8 d x +8 c}-60 a b \,{\mathrm e}^{8 d x +8 c}-47 b^{2} {\mathrm e}^{8 d x +8 c}+48 a^{2} {\mathrm e}^{6 d x +6 c}-72 a b \,{\mathrm e}^{6 d x +6 c}+78 b^{2} {\mathrm e}^{6 d x +6 c}-48 a^{2} {\mathrm e}^{4 d x +4 c}+72 a b \,{\mathrm e}^{4 d x +4 c}-78 \,{\mathrm e}^{4 d x +4 c} b^{2}-72 a^{2} {\mathrm e}^{2 d x +2 c}+60 a b \,{\mathrm e}^{2 d x +2 c}+47 \,{\mathrm e}^{2 d x +2 c} b^{2}-24 a^{2}-12 a b -3 b^{2}\right )}{24 d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{6}}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) a^{2}}{2 d}+\frac {i b a \ln \left ({\mathrm e}^{d x +c}+i\right )}{4 d}+\frac {i b^{2} \ln \left ({\mathrm e}^{d x +c}+i\right )}{16 d}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) a^{2}}{2 d}-\frac {i b \ln \left ({\mathrm e}^{d x +c}-i\right ) a}{4 d}-\frac {i b^{2} \ln \left ({\mathrm e}^{d x +c}-i\right )}{16 d}\) | \(358\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 2824 vs. \(2 (117) = 234\).
Time = 0.28 (sec) , antiderivative size = 2824, normalized size of antiderivative = 22.59 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2} \operatorname {sech}^{3}{\left (c + d x \right )}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 345 vs. \(2 (117) = 234\).
Time = 0.28 (sec) , antiderivative size = 345, normalized size of antiderivative = 2.76 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=-\frac {1}{24} \, b^{2} {\left (\frac {3 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {3 \, e^{\left (-d x - c\right )} - 47 \, e^{\left (-3 \, d x - 3 \, c\right )} + 78 \, e^{\left (-5 \, d x - 5 \, c\right )} - 78 \, e^{\left (-7 \, d x - 7 \, c\right )} + 47 \, e^{\left (-9 \, d x - 9 \, c\right )} - 3 \, e^{\left (-11 \, d x - 11 \, c\right )}}{d {\left (6 \, e^{\left (-2 \, d x - 2 \, c\right )} + 15 \, e^{\left (-4 \, d x - 4 \, c\right )} + 20 \, e^{\left (-6 \, d x - 6 \, c\right )} + 15 \, e^{\left (-8 \, d x - 8 \, c\right )} + 6 \, e^{\left (-10 \, d x - 10 \, c\right )} + e^{\left (-12 \, d x - 12 \, c\right )} + 1\right )}}\right )} - \frac {1}{2} \, a b {\left (\frac {\arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {e^{\left (-d x - c\right )} - 7 \, e^{\left (-3 \, d x - 3 \, c\right )} + 7 \, e^{\left (-5 \, d x - 5 \, c\right )} - e^{\left (-7 \, d x - 7 \, c\right )}}{d {\left (4 \, e^{\left (-2 \, d x - 2 \, c\right )} + 6 \, e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-8 \, d x - 8 \, c\right )} + 1\right )}}\right )} - a^{2} {\left (\frac {\arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (117) = 234\).
Time = 0.36 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.14 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {3 \, {\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )} e^{\left (-d x - c\right )}\right )\right )} {\left (8 \, a^{2} + 4 \, a b + b^{2}\right )} + \frac {4 \, {\left (24 \, a^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{5} + 12 \, a b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{5} + 3 \, b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{5} + 192 \, a^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{3} - 32 \, b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{3} + 384 \, a^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} - 192 \, a b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} - 48 \, b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}\right )}}{{\left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}^{3}}}{96 \, d} \]
[In]
[Out]
Time = 0.17 (sec) , antiderivative size = 572, normalized size of antiderivative = 4.58 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (8\,a^2\,\sqrt {d^2}+b^2\,\sqrt {d^2}+4\,a\,b\,\sqrt {d^2}\right )}{d\,\sqrt {64\,a^4+64\,a^3\,b+32\,a^2\,b^2+8\,a\,b^3+b^4}}\right )\,\sqrt {64\,a^4+64\,a^3\,b+32\,a^2\,b^2+8\,a\,b^3+b^4}}{8\,\sqrt {d^2}}-\frac {\frac {2\,{\mathrm {e}}^{c+d\,x}\,{\left (a+b\right )}^2}{3\,d}+\frac {8\,{\mathrm {e}}^{3\,c+3\,d\,x}\,\left (a^2-b^2\right )}{3\,d}+\frac {8\,{\mathrm {e}}^{7\,c+7\,d\,x}\,\left (a^2-b^2\right )}{3\,d}+\frac {2\,{\mathrm {e}}^{9\,c+9\,d\,x}\,{\left (a+b\right )}^2}{3\,d}+\frac {4\,{\mathrm {e}}^{5\,c+5\,d\,x}\,\left (3\,a^2-2\,a\,b+3\,b^2\right )}{3\,d}}{6\,{\mathrm {e}}^{2\,c+2\,d\,x}+15\,{\mathrm {e}}^{4\,c+4\,d\,x}+20\,{\mathrm {e}}^{6\,c+6\,d\,x}+15\,{\mathrm {e}}^{8\,c+8\,d\,x}+6\,{\mathrm {e}}^{10\,c+10\,d\,x}+{\mathrm {e}}^{12\,c+12\,d\,x}+1}-\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (15\,b^2+4\,a\,b\right )}{3\,d\,\left (4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )}+\frac {16\,b^2\,{\mathrm {e}}^{c+d\,x}}{3\,d\,\left (5\,{\mathrm {e}}^{2\,c+2\,d\,x}+10\,{\mathrm {e}}^{4\,c+4\,d\,x}+10\,{\mathrm {e}}^{6\,c+6\,d\,x}+5\,{\mathrm {e}}^{8\,c+8\,d\,x}+{\mathrm {e}}^{10\,c+10\,d\,x}+1\right )}+\frac {{\mathrm {e}}^{c+d\,x}\,\left (8\,a^2+4\,a\,b+b^2\right )}{8\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {{\mathrm {e}}^{c+d\,x}\,\left (16\,a^2+44\,a\,b+23\,b^2\right )}{12\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}+\frac {{\mathrm {e}}^{c+d\,x}\,\left (21\,b^2+20\,a\,b\right )}{3\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )} \]
[In]
[Out]